package com.huawei.hianalytics.ab.bc.de;

import android.os.Build;
import android.text.TextUtils;
import com.huawei.hianalytics.ab.bc.cd.bc.ef;
import com.huawei.hianalytics.ab.bc.ef.ab;
import com.huawei.hianalytics.ab.ef.bc;
import com.huawei.hianalytics.ab.ef.cd;
import java.util.HashMap;
import java.util.Map;

public class de {
    public static ef ab() {
        ab.bc("hmsSdk", "generate UploadData");
        gh.ab().bc();
        if (!TextUtils.isEmpty(gh.ab().de())) {
            return new ef(gh.ab().cd());
        }
        ab.cd("hmsSdk", "event chifer is empty");
        return null;
    }

    public static com.huawei.hianalytics.ab.ef.ab ab(String str, String str2) {
        com.huawei.hianalytics.ab.ef.ab abVar = new com.huawei.hianalytics.ab.ef.ab();
        abVar.ab(com.huawei.hianalytics.ab.cd.bc.ab.ab().de(str, str2));
        return abVar;
    }

    public static bc ab(String str, String str2, String str3, String str4) {
        bc bcVar = new bc();
        bcVar.fg(str);
        bcVar.ab(com.huawei.hianalytics.ab.ab.bc.ef());
        bcVar.cd(str2);
        bcVar.ef(str4);
        StringBuffer stringBuffer = new StringBuffer("hmshi");
        stringBuffer.append(str3).append("qrt");
        bcVar.de(stringBuffer.toString());
        return bcVar;
    }

    public static cd ab(String str, String str2, String str3) {
        cd cdVar = new cd();
        cdVar.ab(com.huawei.hianalytics.ab.ab.bc.bc());
        cdVar.bc(com.huawei.hianalytics.ab.ab.bc.de());
        cdVar.cd(str3);
        cdVar.de(com.huawei.hianalytics.ab.cd.bc.ab.ab().ef(str2, str));
        return cdVar;
    }

    public static Map<String, String> bc(String str, String str2) {
        Map<String, String> hashMap = new HashMap();
        hashMap.put("App-Id", com.huawei.hianalytics.ab.ab.bc.ef());
        hashMap.put("App-Ver", com.huawei.hianalytics.ab.ab.bc.fg());
        hashMap.put("Sdk-Name", "hianalytics");
        hashMap.put("Sdk-Ver", "2.2.0.301");
        hashMap.put("Device-Type", Build.MODEL);
        hashMap.put("servicetag", str);
        ab.ab("hmsSdk", "sendData RequestId : %s", str2);
        hashMap.put("Request-Id", str2);
        return hashMap;
    }
}
